<!--
 * @Description: 表头
 * @Author: 阳婷
 * @Date: 2021-03-17 09:41:38
 * @LastEditTime: 2021-03-18 13:32:46
 * @LastEditors: 阳婷
-->

<template>
  <div class="table-btn-header">
    <el-button type="text" icon="fa fa-check-circle-o" v-if='hideBtn.Enable' @click='defaultClick("启用")'> 启用</el-button>
    <el-button type="text" icon="fa fa-ban" v-if='hideBtn.Disable' @click='defaultClick("禁用")'> 禁用</el-button>
    <el-button type="text" icon="fa fa-trash" v-if='hideBtn.delete' @click='defaultClick("删除")'> 删除</el-button>
    <div class='f-r'>
      <slot></slot>
    </div>
  </div>
</template>

<script>
    export default {
        props: {
            hideBtn: {
                type: Object,
                default: function() {
                    return {
                        Enable: true,
                        Disable: true,
                        delete: true,
                    }
                }
            },
        },
        data() {
            return {}
        },
        watch: {},
        methods: {
            defaultClick(val) {
                this.$emit('click', val)
            }
        }
    }
</script>
<style scoped>
    .table-btn-header {
        border: 1px solid #ddd;
        border-bottom: none;
        overflow: auto;
    }
</style>